package org.colafries.admin.exceptions;

import org.colafries.admin.exceptions.enums.ErrorCodeEnum;
import lombok.Data;

/**
 * @author colafries
 * @version v1.0
 * @ClassName ServiceException
 * @Description
 * @date Created in 2024/5/27
 **/
@Data
public class ServiceException extends RuntimeException {
    private String code;
    private String message;

    public ServiceException(ErrorCodeEnum codeEnum, String message) {
        this.code = codeEnum.code();
        this.message = message;
    }

    public ServiceException(String message){
        this.message = message;
    }
    public ServiceException(){

    }
}
